package edu.cth.scrabbit.server.core;

/*
 * Note that this class contains no letters, but only positional information
 * regarding where on the game board a word exists
 */
public class Word {
	int highestX = Integer.MIN_VALUE;
	int lowestX = Integer.MAX_VALUE;
	int highestY = Integer.MIN_VALUE;
	int lowestY = Integer.MAX_VALUE;

	public Word(int hx, int lx, int hy, int ly) {
		this.highestX = hx;
		this.lowestX = lx;
		this.highestY = hy;
		this.lowestY = ly;
	}

	public int getHighestX() {
		return highestX;
	}

	public int getLowestX() {
		return lowestX;
	}

	public int getHighestY() {
		return highestY;
	}

	public int getLowestY() {
		return lowestY;
	}

	public boolean isHorizontal() {
		return this.highestY == this.lowestY;
	}

	public boolean isVertical() {
		return this.highestX == this.lowestX;
	}
}
